USE [Ejemplos]
GO

/****** Object:  StoredProcedure [dbo].[DetalleAgregar]    Script Date: 05/21/2011 08:49:59 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
create PROCEDURE [dbo].[DetalleAgregar]
	-- Add the parameters for the stored procedure here
	@Id_Maestro as Integer,
	@Id as Integer output,
	@Nombre as varchar(30),
	@Descripcion as varchar(50)
	
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	insert Into dbo.Detalle values (@Id_Maestro,@Nombre,@Descripcion)
	set @Id = SCOPE_IDENTITY()
END


GO


